Make event_pending() architecture-specific.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 11 Apr 2006 09:40:03 +0000 (10:40 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 11 Apr 2006 09:40:03 +0000 (10:40 +0100)
PowerPC needs this because the domain can directly modify the hardware's
"interrupts enabled" bit, and we don't want to patch Linux to replace
all those accesses to use evtchn_upcall_mask instead.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
xen/include/asm-ia64/event.h
xen/include/asm-x86/event.h
xen/include/xen/event.h

index 297351072d669d14533641b9682ef8091d3f9c7b..32afe397950f5a48d5026370191fa22c08922999 100644 (file)
@@ -32,4 +32,9 @@ static inline void evtchn_notify(struct vcpu *v)
        vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector);
 }
 
+/* Note: Bitwise operations result in fast code with no branches. */
+#define event_pending(v)                        \
+    (!!(v)->vcpu_info->evtchn_upcall_pending &  \
+      !(v)->vcpu_info->evtchn_upcall_mask)
+
 #endif
index d491d24313a623bb040fcb18f411dc13be1bf4d3..ad1b9b245a081cb8185ddc4cc4ed1d8b24f740b6 100644 (file)
@@ -26,4 +26,9 @@ static inline void evtchn_notify(struct vcpu *v)
         smp_send_event_check_cpu(v->processor);
 }
 
+/* Note: Bitwise operations result in fast code with no branches. */
+#define event_pending(v)                        \
+    (!!(v)->vcpu_info->evtchn_upcall_pending &  \
+      !(v)->vcpu_info->evtchn_upcall_mask)
+
 #endif
index 13b2b5f9be13d5255f0ee66ae5f41a6ce918db30..f7dee3b75d3b2000ea3ddc5a3a782cc6a93135df 100644 (file)
@@ -38,11 +38,6 @@ extern void send_guest_global_virq(struct domain *d, int virq);
  */
 extern void send_guest_pirq(struct domain *d, int pirq);
 
-/* Note: Bitwise operations result in fast code with no branches. */
-#define event_pending(v)                        \
-    (!!(v)->vcpu_info->evtchn_upcall_pending &  \
-      !(v)->vcpu_info->evtchn_upcall_mask)
-
 #define evtchn_pending(d, p)                    \
     (test_bit((p), &(d)->shared_info->evtchn_pending[0]))